/**
 * Created by zhangyida on 16/1/7.
 */
'use strict';

import {
    StyleSheet,
    View,
    TouchableOpacity,
    Navigator,
    ScrollView,
    NavigatorIOS,
    Text,
    AsyncStorage,
    TouchableHighlight
} from 'react-native';
import React from 'react';
import Icon from 'react-native-vector-icons/Ionicons';

const NavigationBarRouteMapper = {
    LeftButton(route, navigator, index, navState) {
        return (
            <TouchableOpacity style={{flex: 1, justifyContent: 'center'}}
                              onPress={() => navigator.parentNavigator.pop()}>
                <View style={{flexDirection:'row',padding:5}}>
                    <Icon name="ios-arrow-back" size={18} color="#ffffff" style={{alignSelf:'center'}} />
                    <Text style={{color: 'white', margin: 3,fontSize:16}}>
                        返回
                    </Text>
                </View>
            </TouchableOpacity>
        );
    },
    RightButton(route, navigator, index, navState) {
        return null;
    },
    Title(route, navigator, index, navState) {
        return (
            <Text style={{color: 'white', margin: 10, fontSize: 20}}>
                免责声明
            </Text>
        );
    }
};

export default class MyOut extends React.Component {

    renderScene () {
        return (
            <ScrollView style={styles.container}>
                <Text style={styles.p}>
                    {'\t'}本软件开发者为个人.
                    软件中的内容均为研究学习用,不作为推荐或者购买依据,参考软件造成的盈利和亏损均与开发者,发布者无关.
                    造成的一切后果均由自己承担.继续使用视为遵守本原则.
                </Text>
                <Text style={styles.p}>
                    {'\n'}联系我们:广告业务QQ 2625434319；
                </Text>
            </ScrollView>
        );
    }
    render() {
        return (
            <Navigator
                renderScene={this.renderScene.bind(this)}
                navigator={this.props.navigator}
                navigationBar={
            <Navigator.NavigationBar
                style={{backgroundColor: '#e02820', alignItems: 'center'}}
                routeMapper={NavigationBarRouteMapper} />
          }/>
        );
    }
}

const styles = StyleSheet.create({
    nav: {
        flex: 1
    },
    container: {
        flex: 1,
        paddingTop: 90,
        backgroundColor: '#f5f5f9',
        paddingLeft:10,
        paddingRight:10
    },
    p:{
        textAlign:'justify',
        fontSize:18,
        lineHeight:25
    }
});


